---
layout: default
title: Home
---
<div class="content">
    <div class="main">
        <h1 id="site_title">{{ site.title }}</h1>
        <p id="desc">{{ site.description }}</p>
        <div id="descs_hide">
            {% for desc in site.descs %}
            <p>{{ desc }}</p>
            {% endfor %}
        </div>
    </div>
</div>

<h2>Recently Posts</h2>
<ul class="post-list">
    {% for post in site.posts limit: site.max_posts %}
    <li class="post-index">
        <h2><a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a></h2>
        <span class="post-time">{{ post.date | date_to_string }}</span>
        {% for tag in post.tags %}
        <span class="tag">
            <a href="{{ site.baseurl }}{{ site.data.nav[2].url }}#{{ tag }}">{{ tag }}</a>
        </span>
        {% endfor %}
        <div class="post-excerpt">
            {{ post.desc }}
        </div>
        <div class="div-line">
            <div class='underline'></div>
        </div>
    </li>
    {% endfor %}
</ul>
<h2>
    <a class="see_more" href="{{ site.baseurl }}{{ site.data.nav[1].url }}" alt="see more" destination="see more">
        See more posts</a>
</h2>
<script>
    function init() {
        var desc = document.getElementById("desc");
        var descs = document.getElementById("descs_hide");
        var descs_num = Number("{{ site.descs.size }}");
        function changeDesc() {
            var desc_list = [];
            var len = descs.children.length;
            for (var i = 0; i < len; i++) {
                if (descs.children[i].innerText != desc.innerText) {
                    desc_list.push(descs.children[i].innerText);
                }
            }
            var num = Math.floor(Math.random() * desc_list.length);
            desc.innerText = desc_list[num];
        };
        document.getElementById("site_title").onclick = changeDesc;
    };
    init();
</script>